package com.grass.p019lv.dialog;

import android.app.Dialog;
import android.content.Context;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.alibaba.android.arouter.launcher.ARouter;
import com.androidsa.bttsddka.R;
import com.androidx.p013lv.base.Constance;
import com.androidx.p013lv.base.interfaces.Key;

/* renamed from: com.grass.lv.dialog.DownLoadVideoDialog */
public class DownLoadVideoDialog extends Dialog {
    public static final int DOWN_LOAD_FULL = 1;
    public static final int DOWN_LOAD_OK = 0;
    public static final int DOWN_LOAD_PAY = 2;
    public static final int DOWN_LOAD_VIP = 3;
    private LinearLayout ll_download_fail_pay = ((LinearLayout) findViewById(R.id.ll_download_fail_pay));
    private LinearLayout ll_download_fail_vip = ((LinearLayout) findViewById(R.id.ll_download_fail_vip));
    private LinearLayout ll_download_full = ((LinearLayout) findViewById(R.id.ll_download_full));
    private LinearLayout ll_download_success = ((LinearLayout) findViewById(R.id.ll_download_success));
    private TextView tv_cancel1 = ((TextView) findViewById(R.id.tv_cancel1));
    private TextView tv_cancel2 = ((TextView) findViewById(R.id.tv_cancel2));
    private TextView tv_download_num = ((TextView) findViewById(R.id.tv_download_num));
    private TextView tv_go_download = ((TextView) findViewById(R.id.tv_go_download));
    private TextView tv_go_vip = ((TextView) findViewById(R.id.tv_go_vip));

    public DownLoadVideoDialog(Context context, int i, String str) {
        super(context, R.style.ForceUpdateAppDialog);
        setContentView(R.layout.dialog_download_video_layout);
        Window window = getWindow();
        WindowManager.LayoutParams attributes = window.getAttributes();
        attributes.gravity = 17;
        window.setAttributes(attributes);
        setCancelable(true);
        setCanceledOnTouchOutside(true);
        if (i == 0) {
            this.ll_download_success.setVisibility(0);
            this.tv_download_num.setText(str);
        } else if (i == 1) {
            this.ll_download_full.setVisibility(0);
        } else if (i == 2) {
            this.ll_download_fail_pay.setVisibility(0);
        } else if (i == 3) {
            this.ll_download_fail_vip.setVisibility(0);
        }
        this.tv_go_download.setOnClickListener(new View.OnClickListener() {
            /* class com.grass.p019lv.dialog.DownLoadVideoDialog.View$OnClickListenerC29761 */

            public void onClick(View view) {
                ARouter.getInstance().build(Constance.MINE_DOWNLOAD_VIDEO_ACTIVITY).navigation();
                DownLoadVideoDialog.this.dismiss();
            }
        });
        this.tv_cancel1.setOnClickListener(new View.OnClickListener() {
            /* class com.grass.p019lv.dialog.DownLoadVideoDialog.View$OnClickListenerC29772 */

            public void onClick(View view) {
                DownLoadVideoDialog.this.dismiss();
            }
        });
        this.tv_cancel2.setOnClickListener(new View.OnClickListener() {
            /* class com.grass.p019lv.dialog.DownLoadVideoDialog.View$OnClickListenerC29783 */

            public void onClick(View view) {
                DownLoadVideoDialog.this.dismiss();
            }
        });
        this.tv_go_vip.setOnClickListener(new View.OnClickListener() {
            /* class com.grass.p019lv.dialog.DownLoadVideoDialog.View$OnClickListenerC29794 */

            public void onClick(View view) {
                ARouter.getInstance().build(Constance.VIP_CENTER_ACTIVITY).withString(Key.BACK_TITLE, "返回").navigation();
                DownLoadVideoDialog.this.dismiss();
            }
        });
    }
}
